﻿#region Using Directives

    using System;

    using Csla;

    using MarketPulse.Reporting.Core;

#endregion

namespace MarketPulse.Reporting.Core.Criteria
{
    /// <summary>
    /// Criteria class specifying a ClientGUID, ProfileGUID and ReportingPeriodGUID as search criteria.
    /// </summary>
    [Serializable]
    public class ClientGUIDAndProfileGUIDAndReportingPeriodAndReportingLevelsCriteria : CriteriaBase<ClientGUIDAndProfileGUIDAndReportingPeriodAndReportingLevelsCriteria>
    {

        #region Constructors

            /// <summary>
            /// Default constructor for this class
            /// </summary>
            /// <param name="clientGUID">The GUID of the Client to associate with this criteria</param>                      
            /// <param name="profileGUID">The GUID of the Profile to associate with this criteria</param>                      
            /// <param name="reportingPeriod">The ReportingPeriodInfo object to associate with this criteria</param>
            /// <param name="reportingLevels">The ReportingLevels </param>      
            public ClientGUIDAndProfileGUIDAndReportingPeriodAndReportingLevelsCriteria(Nullable<Guid> clientGUID, Nullable<Guid> profileGUID, ReportingPeriodInfo reportingPeriod, ReportingLevelInfoList reportingLevels)
            {
                ClientGUID = clientGUID;
                ProfileGUID = profileGUID;
                ReportingPeriod = reportingPeriod;
                ReportingLevels = reportingLevels;
            }

        #endregion

        #region Properties

            /// <summary>
            /// This GUID is used to identify the Client object associated with this criteria
            /// </summary>
            public static PropertyInfo<Nullable<Guid>> ClientGUIDProperty = RegisterProperty<Nullable<Guid>>(p => p.ClientGUID);
            /// <summary>
            /// This GUID is used to identify the Client object associated with this criteria
            /// </summary>
            public Nullable<Guid> ClientGUID
            {
                get { return ReadProperty(ClientGUIDProperty); }
                private set { LoadProperty(ClientGUIDProperty, value); }
            }

            /// <summary>
            /// This GUID is used to identify the Profile object associated with this criteria
            /// </summary>
            public static PropertyInfo<Nullable<Guid>> ProfileGUIDProperty = RegisterProperty<Nullable<Guid>>(p => p.ProfileGUID);
            /// <summary>
            /// This GUID is used to identify the Profile object associated with this criteria
            /// </summary>
            public Nullable<Guid> ProfileGUID
            {
                get { return ReadProperty(ProfileGUIDProperty); }
                private set { LoadProperty(ProfileGUIDProperty, value); }
            }

            /// <summary>
            /// This property is used to identify the ReportingPeriod object associated with this criteria
            /// </summary>
            public static PropertyInfo<ReportingPeriodInfo> ReportingPeriodProperty = RegisterProperty<ReportingPeriodInfo>(p => p.ReportingPeriod);
            /// <summary>
            /// This property is used to identify the ReportingPeriod object associated with this criteria
            /// </summary>
            public ReportingPeriodInfo ReportingPeriod
            {
                get { return ReadProperty(ReportingPeriodProperty); }
                private set { LoadProperty(ReportingPeriodProperty, value); }
            }

            /// <summary>
            /// This property is used to identify the ReportingLevelInfoList object associated with this criteria
            /// </summary>
            public static PropertyInfo<ReportingLevelInfoList> ReportingLevelsProperty = RegisterProperty<ReportingLevelInfoList>(p => p.ReportingLevels);
            /// <summary>
            /// This property is used to identify the ReportingLevelInfoList object associated with this criteria
            /// </summary>
            public ReportingLevelInfoList ReportingLevels
            {
                get { return ReadProperty(ReportingLevelsProperty); }
                private set { LoadProperty(ReportingLevelsProperty, value); }
            }

        #endregion

    }
}
